<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量</title>
</head>
<body>
    <script>
      //局部
      let name="zx";
      document.write(name+"<br>");

      //全局
      {
        a="ccc";
      }
      document.write(a);

      //常量
      const ip=192.2831;
      document.write(ip);

    </script>
</body>
</html>